Integrand size = 26, antiderivative size = 104 \[ \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx=\frac {a x}{(c-i d)^3}-\frac {a \log (c \cos (e+f x)+d \sin (e+f x))}{(i c+d)^3 f}-\frac {a}{2 (i c+d) f (c+d \tan (e+f x))^2}+\frac {i a}{(c-i d)^2 f (c+d \tan (e+f x))} \]
a*x/(c-I*d)^3-a*ln(c*cos(f*x+e)+d*sin(f*x+e))/(I*c+d)^3/f-1/2*a/(I*c+d)/f/ (c+d*tan(f*x+e))^2+I*a/(c-I*d)^2/f/(c+d*tan(f*x+e))
Time = 1.83 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.86 \[ \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx=\frac {i a \left (2 \log (i+\tan (e+f x))-2 \log (c+d \tan (e+f x))+\frac {(c-i d)^2}{(c+d \tan (e+f x))^2}+\frac {2 (c-i d)}{c+d \tan (e+f x)}\right )}{2 (c-i d)^3 f} \]
((I/2)*a*(2*Log[I + Tan[e + f*x]] - 2*Log[c + d*Tan[e + f*x]] + (c - I*d)^ 2/(c + d*Tan[e + f*x])^2 + (2*(c - I*d))/(c + d*Tan[e + f*x])))/((c - I*d) ^3*f)
Time = 0.72 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.43, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3042, 4012, 3042, 4012, 3042, 4014, 3042, 4013}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3}dx\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {\int \frac {a (c+i d)+a (i c-d) \tan (e+f x)}{(c+d \tan (e+f x))^2}dx}{c^2+d^2}-\frac {a}{2 f (d+i c) (c+d \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (c+i d)+a (i c-d) \tan (e+f x)}{(c+d \tan (e+f x))^2}dx}{c^2+d^2}-\frac {a}{2 f (d+i c) (c+d \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {\frac {\int \frac {a (c+i d)^2+i a \tan (e+f x) (c+i d)^2}{c+d \tan (e+f x)}dx}{c^2+d^2}+\frac {a (-d+i c)}{f (c-i d) (c+d \tan (e+f x))}}{c^2+d^2}-\frac {a}{2 f (d+i c) (c+d \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {a (c+i d)^2+i a \tan (e+f x) (c+i d)^2}{c+d \tan (e+f x)}dx}{c^2+d^2}+\frac {a (-d+i c)}{f (c-i d) (c+d \tan (e+f x))}}{c^2+d^2}-\frac {a}{2 f (d+i c) (c+d \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle \frac {\frac {\frac {a (c+i d)^2 \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)}dx}{d+i c}+\frac {a x (c+i d)^3}{c^2+d^2}}{c^2+d^2}+\frac {a (-d+i c)}{f (c-i d) (c+d \tan (e+f x))}}{c^2+d^2}-\frac {a}{2 f (d+i c) (c+d \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {a (c+i d)^2 \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)}dx}{d+i c}+\frac {a x (c+i d)^3}{c^2+d^2}}{c^2+d^2}+\frac {a (-d+i c)}{f (c-i d) (c+d \tan (e+f x))}}{c^2+d^2}-\frac {a}{2 f (d+i c) (c+d \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4013 |
\(\displaystyle \frac {\frac {\frac {a x (c+i d)^3}{c^2+d^2}+\frac {a (c+i d)^2 \log (c \cos (e+f x)+d \sin (e+f x))}{f (d+i c)}}{c^2+d^2}+\frac {a (-d+i c)}{f (c-i d) (c+d \tan (e+f x))}}{c^2+d^2}-\frac {a}{2 f (d+i c) (c+d \tan (e+f x))^2}\) |
-1/2*a/((I*c + d)*f*(c + d*Tan[e + f*x])^2) + (((a*(c + I*d)^3*x)/(c^2 + d ^2) + (a*(c + I*d)^2*Log[c*Cos[e + f*x] + d*Sin[e + f*x]])/((I*c + d)*f))/ (c^2 + d^2) + (a*(I*c - d))/((c - I*d)*f*(c + d*Tan[e + f*x])))/(c^2 + d^2 )
3.11.97.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/ (f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x] )^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1 ]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)* (x_)]), x_Symbol] :> Simp[(c/(b*f))*Log[RemoveContent[a*Cos[e + f*x] + b*Si n[e + f*x], x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[(a*c + b*d)*(x/(a^2 + b^2)), x] + Simp[(b*c - a *d)/(a^2 + b^2) Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && N eQ[a*c + b*d, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 199 vs. \(2 (97 ) = 194\).
Time = 0.45 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.92
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\frac {\left (i c^{3}-3 i c \,d^{2}-3 c^{2} d +d^{3}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (3 i c^{2} d -i d^{3}+c^{3}-3 c \,d^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{3}}-\frac {\left (i c^{3}-3 i c \,d^{2}-3 c^{2} d +d^{3}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{3}}+\frac {i c -d}{2 \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )^{2}}+\frac {i c^{2}-i d^{2}-2 c d}{\left (c^{2}+d^{2}\right )^{2} \left (c +d \tan \left (f x +e \right )\right )}\right )}{f}\) | \(200\) |
default | \(\frac {a \left (\frac {\frac {\left (i c^{3}-3 i c \,d^{2}-3 c^{2} d +d^{3}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (3 i c^{2} d -i d^{3}+c^{3}-3 c \,d^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{3}}-\frac {\left (i c^{3}-3 i c \,d^{2}-3 c^{2} d +d^{3}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{3}}+\frac {i c -d}{2 \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )^{2}}+\frac {i c^{2}-i d^{2}-2 c d}{\left (c^{2}+d^{2}\right )^{2} \left (c +d \tan \left (f x +e \right )\right )}\right )}{f}\) | \(200\) |
risch | \(-\frac {2 a x}{3 i c^{2} d -i d^{3}-c^{3}+3 c \,d^{2}}-\frac {2 i a x}{i c^{3}-3 i c \,d^{2}+3 c^{2} d -d^{3}}-\frac {2 i a e}{f \left (i c^{3}-3 i c \,d^{2}+3 c^{2} d -d^{3}\right )}+\frac {-4 i a \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+4 a c d \,{\mathrm e}^{2 i \left (f x +e \right )}+2 i a \,d^{2}+4 a c d}{\left (-i {\mathrm e}^{2 i \left (f x +e \right )} d +{\mathrm e}^{2 i \left (f x +e \right )} c +i d +c \right )^{2} f \left (-i d +c \right )^{3}}+\frac {a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right )}{f \left (i c^{3}-3 i c \,d^{2}+3 c^{2} d -d^{3}\right )}\) | \(249\) |
norman | \(\frac {\frac {a \,c^{2} x}{\left (-i d +c \right ) \left (-2 i c d +c^{2}-d^{2}\right )}+\frac {2 i a c d +a \,d^{2}}{2 f \left (-2 i c d +c^{2}-d^{2}\right ) d}+\frac {i d^{2} a \left (\tan ^{2}\left (f x +e \right )\right )}{2 \left (2 i c d -c^{2}+d^{2}\right ) f c}+\frac {2 c d a x \tan \left (f x +e \right )}{\left (-i d +c \right ) \left (-2 i c d +c^{2}-d^{2}\right )}-\frac {i a \,d^{2} x \left (\tan ^{2}\left (f x +e \right )\right )}{\left (i c +d \right ) \left (2 i c d -c^{2}+d^{2}\right )}}{\left (c +d \tan \left (f x +e \right )\right )^{2}}+\frac {i a \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \left (-3 i c^{2} d +i d^{3}+c^{3}-3 c \,d^{2}\right )}-\frac {i a \ln \left (c +d \tan \left (f x +e \right )\right )}{f \left (-3 i c^{2} d +i d^{3}+c^{3}-3 c \,d^{2}\right )}\) | \(281\) |
parallelrisch | \(\text {Expression too large to display}\) | \(926\) |
1/f*a*(1/(c^2+d^2)^3*(1/2*(I*c^3-3*I*c*d^2-3*c^2*d+d^3)*ln(1+tan(f*x+e)^2) +(3*I*c^2*d-I*d^3+c^3-3*c*d^2)*arctan(tan(f*x+e)))-(I*c^3-3*I*c*d^2-3*c^2* d+d^3)/(c^2+d^2)^3*ln(c+d*tan(f*x+e))+1/2*(I*c-d)/(c^2+d^2)/(c+d*tan(f*x+e ))^2+(I*c^2-I*d^2-2*c*d)/(c^2+d^2)^2/(c+d*tan(f*x+e)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (92) = 184\).
Time = 0.25 (sec) , antiderivative size = 272, normalized size of antiderivative = 2.62 \[ \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx=\frac {4 i \, a c d - 2 \, a d^{2} - 4 \, {\left (-i \, a c d - a d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (a c^{2} + 2 i \, a c d - a d^{2} + {\left (a c^{2} - 2 i \, a c d - a d^{2}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, {\left (a c^{2} + a d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right )}{{\left (i \, c^{5} + 5 \, c^{4} d - 10 i \, c^{3} d^{2} - 10 \, c^{2} d^{3} + 5 i \, c d^{4} + d^{5}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} - 2 \, {\left (-i \, c^{5} - 3 \, c^{4} d + 2 i \, c^{3} d^{2} - 2 \, c^{2} d^{3} + 3 i \, c d^{4} + d^{5}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, c^{5} + c^{4} d + 2 i \, c^{3} d^{2} + 2 \, c^{2} d^{3} + i \, c d^{4} + d^{5}\right )} f} \]
(4*I*a*c*d - 2*a*d^2 - 4*(-I*a*c*d - a*d^2)*e^(2*I*f*x + 2*I*e) + (a*c^2 + 2*I*a*c*d - a*d^2 + (a*c^2 - 2*I*a*c*d - a*d^2)*e^(4*I*f*x + 4*I*e) + 2*( a*c^2 + a*d^2)*e^(2*I*f*x + 2*I*e))*log(((I*c + d)*e^(2*I*f*x + 2*I*e) + I *c - d)/(I*c + d)))/((I*c^5 + 5*c^4*d - 10*I*c^3*d^2 - 10*c^2*d^3 + 5*I*c* d^4 + d^5)*f*e^(4*I*f*x + 4*I*e) - 2*(-I*c^5 - 3*c^4*d + 2*I*c^3*d^2 - 2*c ^2*d^3 + 3*I*c*d^4 + d^5)*f*e^(2*I*f*x + 2*I*e) + (I*c^5 + c^4*d + 2*I*c^3 *d^2 + 2*c^2*d^3 + I*c*d^4 + d^5)*f)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 354 vs. \(2 (82) = 164\).
Time = 3.52 (sec) , antiderivative size = 354, normalized size of antiderivative = 3.40 \[ \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx=- \frac {i a \log {\left (\frac {c + i d}{c e^{2 i e} - i d e^{2 i e}} + e^{2 i f x} \right )}}{f \left (c - i d\right )^{3}} + \frac {4 a c d + 2 i a d^{2} + \left (4 a c d e^{2 i e} - 4 i a d^{2} e^{2 i e}\right ) e^{2 i f x}}{c^{5} f - i c^{4} d f + 2 c^{3} d^{2} f - 2 i c^{2} d^{3} f + c d^{4} f - i d^{5} f + \left (2 c^{5} f e^{2 i e} - 6 i c^{4} d f e^{2 i e} - 4 c^{3} d^{2} f e^{2 i e} - 4 i c^{2} d^{3} f e^{2 i e} - 6 c d^{4} f e^{2 i e} + 2 i d^{5} f e^{2 i e}\right ) e^{2 i f x} + \left (c^{5} f e^{4 i e} - 5 i c^{4} d f e^{4 i e} - 10 c^{3} d^{2} f e^{4 i e} + 10 i c^{2} d^{3} f e^{4 i e} + 5 c d^{4} f e^{4 i e} - i d^{5} f e^{4 i e}\right ) e^{4 i f x}} \]
-I*a*log((c + I*d)/(c*exp(2*I*e) - I*d*exp(2*I*e)) + exp(2*I*f*x))/(f*(c - I*d)**3) + (4*a*c*d + 2*I*a*d**2 + (4*a*c*d*exp(2*I*e) - 4*I*a*d**2*exp(2 *I*e))*exp(2*I*f*x))/(c**5*f - I*c**4*d*f + 2*c**3*d**2*f - 2*I*c**2*d**3* f + c*d**4*f - I*d**5*f + (2*c**5*f*exp(2*I*e) - 6*I*c**4*d*f*exp(2*I*e) - 4*c**3*d**2*f*exp(2*I*e) - 4*I*c**2*d**3*f*exp(2*I*e) - 6*c*d**4*f*exp(2* I*e) + 2*I*d**5*f*exp(2*I*e))*exp(2*I*f*x) + (c**5*f*exp(4*I*e) - 5*I*c**4 *d*f*exp(4*I*e) - 10*c**3*d**2*f*exp(4*I*e) + 10*I*c**2*d**3*f*exp(4*I*e) + 5*c*d**4*f*exp(4*I*e) - I*d**5*f*exp(4*I*e))*exp(4*I*f*x))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 325 vs. \(2 (92) = 184\).
Time = 0.31 (sec) , antiderivative size = 325, normalized size of antiderivative = 3.12 \[ \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx=\frac {\frac {2 \, {\left (a c^{3} + 3 i \, a c^{2} d - 3 \, a c d^{2} - i \, a d^{3}\right )} {\left (f x + e\right )}}{c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}} + \frac {2 \, {\left (-i \, a c^{3} + 3 \, a c^{2} d + 3 i \, a c d^{2} - a d^{3}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}} + \frac {{\left (i \, a c^{3} - 3 \, a c^{2} d - 3 i \, a c d^{2} + a d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}} + \frac {3 i \, a c^{3} - 5 \, a c^{2} d - i \, a c d^{2} - a d^{3} + 2 \, {\left (i \, a c^{2} d - 2 \, a c d^{2} - i \, a d^{3}\right )} \tan \left (f x + e\right )}{c^{6} + 2 \, c^{4} d^{2} + c^{2} d^{4} + {\left (c^{4} d^{2} + 2 \, c^{2} d^{4} + d^{6}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left (c^{5} d + 2 \, c^{3} d^{3} + c d^{5}\right )} \tan \left (f x + e\right )}}{2 \, f} \]
1/2*(2*(a*c^3 + 3*I*a*c^2*d - 3*a*c*d^2 - I*a*d^3)*(f*x + e)/(c^6 + 3*c^4* d^2 + 3*c^2*d^4 + d^6) + 2*(-I*a*c^3 + 3*a*c^2*d + 3*I*a*c*d^2 - a*d^3)*lo g(d*tan(f*x + e) + c)/(c^6 + 3*c^4*d^2 + 3*c^2*d^4 + d^6) + (I*a*c^3 - 3*a *c^2*d - 3*I*a*c*d^2 + a*d^3)*log(tan(f*x + e)^2 + 1)/(c^6 + 3*c^4*d^2 + 3 *c^2*d^4 + d^6) + (3*I*a*c^3 - 5*a*c^2*d - I*a*c*d^2 - a*d^3 + 2*(I*a*c^2* d - 2*a*c*d^2 - I*a*d^3)*tan(f*x + e))/(c^6 + 2*c^4*d^2 + c^2*d^4 + (c^4*d ^2 + 2*c^2*d^4 + d^6)*tan(f*x + e)^2 + 2*(c^5*d + 2*c^3*d^3 + c*d^5)*tan(f *x + e)))/f
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 347 vs. \(2 (92) = 184\).
Time = 0.57 (sec) , antiderivative size = 347, normalized size of antiderivative = 3.34 \[ \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx=\frac {2 \, {\left (\frac {a \log \left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - c\right )}{2 i \, c^{3} + 6 \, c^{2} d - 6 i \, c d^{2} - 2 \, d^{3}} - \frac {a \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{i \, c^{3} + 3 \, c^{2} d - 3 i \, c d^{2} - d^{3}} + \frac {3 \, a c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 4 \, a c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 12 i \, a c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 4 \, a c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, a c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 16 i \, a c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, a d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, a c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 12 i \, a c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 4 \, a c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 \, a c^{4}}{-4 \, {\left (i \, c^{5} + 3 \, c^{4} d - 3 i \, c^{3} d^{2} - c^{2} d^{3}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - c\right )}^{2}}\right )}}{f} \]
2*(a*log(c*tan(1/2*f*x + 1/2*e)^2 - 2*d*tan(1/2*f*x + 1/2*e) - c)/(2*I*c^3 + 6*c^2*d - 6*I*c*d^2 - 2*d^3) - a*log(tan(1/2*f*x + 1/2*e) + I)/(I*c^3 + 3*c^2*d - 3*I*c*d^2 - d^3) + (3*a*c^4*tan(1/2*f*x + 1/2*e)^4 - 4*a*c^3*d* tan(1/2*f*x + 1/2*e)^3 - 12*I*a*c^2*d^2*tan(1/2*f*x + 1/2*e)^3 - 4*a*c*d^3 *tan(1/2*f*x + 1/2*e)^3 - 6*a*c^4*tan(1/2*f*x + 1/2*e)^2 + 16*I*a*c*d^3*ta n(1/2*f*x + 1/2*e)^2 + 4*a*d^4*tan(1/2*f*x + 1/2*e)^2 + 4*a*c^3*d*tan(1/2* f*x + 1/2*e) + 12*I*a*c^2*d^2*tan(1/2*f*x + 1/2*e) + 4*a*c*d^3*tan(1/2*f*x + 1/2*e) + 3*a*c^4)/((-4*I*c^5 - 12*c^4*d + 12*I*c^3*d^2 + 4*c^2*d^3)*(c* tan(1/2*f*x + 1/2*e)^2 - 2*d*tan(1/2*f*x + 1/2*e) - c)^2))/f
Time = 6.09 (sec) , antiderivative size = 281, normalized size of antiderivative = 2.70 \[ \int \frac {a+i a \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx=-\frac {\frac {\left (3\,a\,c-a\,d\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,d^2\,\left (-c^2+c\,d\,2{}\mathrm {i}+d^2\right )}+\frac {a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}{d\,\left (-c^2+c\,d\,2{}\mathrm {i}+d^2\right )}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^2+\frac {c^2}{d^2}+\frac {2\,c\,\mathrm {tan}\left (e+f\,x\right )}{d}\right )}+\frac {a\,\mathrm {atan}\left (\frac {c^3-c^2\,d\,1{}\mathrm {i}+c\,d^2-d^3\,1{}\mathrm {i}}{{\left (c-d\,1{}\mathrm {i}\right )}^2\,\left (d+c\,1{}\mathrm {i}\right )}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (2\,c^8\,d^2+8\,c^6\,d^4+12\,c^4\,d^6+8\,c^2\,d^8+2\,d^{10}\right )\,1{}\mathrm {i}}{{\left (c-d\,1{}\mathrm {i}\right )}^2\,\left (d+c\,1{}\mathrm {i}\right )\,\left (-c^6\,d\,1{}\mathrm {i}+2\,c^5\,d^2-c^4\,d^3\,1{}\mathrm {i}+4\,c^3\,d^4+c^2\,d^5\,1{}\mathrm {i}+2\,c\,d^6+d^7\,1{}\mathrm {i}\right )}\right )\,2{}\mathrm {i}}{f\,{\left (c-d\,1{}\mathrm {i}\right )}^2\,\left (d+c\,1{}\mathrm {i}\right )} \]
(a*atan((c*d^2 - c^2*d*1i + c^3 - d^3*1i)/((c - d*1i)^2*(c*1i + d)) - (tan (e + f*x)*(2*d^10 + 8*c^2*d^8 + 12*c^4*d^6 + 8*c^6*d^4 + 2*c^8*d^2)*1i)/(( c - d*1i)^2*(c*1i + d)*(2*c*d^6 - c^6*d*1i + d^7*1i + c^2*d^5*1i + 4*c^3*d ^4 - c^4*d^3*1i + 2*c^5*d^2)))*2i)/(f*(c - d*1i)^2*(c*1i + d)) - (((3*a*c - a*d*1i)*1i)/(2*d^2*(c*d*2i - c^2 + d^2)) + (a*tan(e + f*x)*1i)/(d*(c*d*2 i - c^2 + d^2)))/(f*(tan(e + f*x)^2 + c^2/d^2 + (2*c*tan(e + f*x))/d))